import unittest

from com.test.jisuanqi import Jisuanqi


class Demo2(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        print("这是类函数setUpClass")
    @classmethod
    def tearDownClass(cls):
        print("这是类函数tearDownClass")
    def setUp(self): #用于构建环境
        print("构建环境")

    def tearDown(self):  #用于还原环境
        print("还原环境")

    def test_add(self):
        obj = Jisuanqi()
        self.assertEqual(obj.add(11,999),1110)
    def test_sub(self):
        obj = Jisuanqi()
        self.assertEqual(obj.sub(1110,999),111)
if __name__ == '__main__':
    unittest.main()